/*    */ package com.finir.finknjig.reports.jasper;
/*    */ 
/*    */ import java.util.List;
import java.util.Map;

import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
/*    */ 
/*    */ public class RunJasper
/*    */ {
/*    */   public void showReport(List data, Map map, String faktura)
/*    */   {
/*    */     try
/*    */     {
/* 21 */       JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(data);
/*    */ 
/* 23 */       JasperPrint fillReport = JasperFillManager.fillReport(faktura, map, 
/* 24 */         ds);
/*    */ 
/* 26 */       CustomJasperViewer viewer = new CustomJasperViewer(fillReport);
/* 27 */       viewer.setVisible(true);
/*    */     }
/*    */     catch (JRException e)
/*    */     {
/* 31 */       e.printStackTrace();
/*    */     }
/*    */   }
/*    */ }

